#pragma once 

#define MAX 1024

#define NONE_FLUSH (1<<0)
#define LINE_FLUSH (1<<1)
#define FULL_FLUSH (1<<2)

typedef struct Iofile
{
    int fileno;
    int flag;
    char outbuffer[MAX];
    int bufferlen;
    int fflush_method;
}Myfile;

Myfile* Myfopen(const char* path,const char* mode);

void Myfclose(Myfile*);

int Mywrite(Myfile* file ,void* str,int len);

void Myfflush(Myfile* file);
